dojo.provide('annotation');
dojo.require('dijit._Widget');
dojo.require('dijit._Templated');

dojo.declare('widgets.annotation.annotation', [dijit._Widget, dijit._Templated], {
	
	templatePath : new dojo._Url('dojo-release-1.7.2/widgets/annotation/', 'annotation.html'),
	
	user: "",
	date: "",
	avatarSrc: "dojo-release-1.7.2/widgets/annotation/nophoto.jpg",
	text: "",
	annotationType: "comment",
	visible: true,
	
	hide: function(){
		var container = this._container;
		dojo.setStyle(container, {"display" : "none"});
	},
	
	setAnnotationType: function(){
		var text = this._text;
		switch(this.annotationType){
			case "comment":
				dojo.addClass(text, "comment");
				break;
			case "info":
				dojo.addClass(text, "info");
				break;
			case "decision":
				dojo.addClass(text, "decision");
				break;
		}
	},
	
	postCreate : function () {
	      this.setAnnotationType();
	},
	
});